#include "Models.h"
#include "Triangle.h"

Models::Models(void)
{
	makeModels();
}


Models::~Models(void)
{
}


void Models::makeModels()
{
	std::vector<Triangle> cube;
	// top
		//t1
	cube.push_back(
		Triangle(
		Vector3<float>(-1,1,-1),
		Vector3<float>(1,1,-1),
		Vector3<float>(1,1,1)));

		//t2
	cube.push_back(
		Triangle(
		Vector3<float>(1,1,1),
		Vector3<float>(-1,1,1),
		Vector3<float>(-1,1,-1)));

	// bottom
		//t1
	cube.push_back(
		Triangle(
		Vector3<float>(1,-1,1),
		Vector3<float>(1,-1,-1),
		Vector3<float>(-1,-1,-1)));
		//t2
	cube.push_back(
		Triangle(
		Vector3<float>(-1,-1,-1),
		Vector3<float>(-1,-1,1),
		Vector3<float>(1,-1,1)));

	// right
		//t1
	cube.push_back(
		Triangle(
		Vector3<float>(1,-1,1),
		Vector3<float>(1,1,1),
		Vector3<float>(1,1,-1)));
		//t2
	cube.push_back(
		Triangle(
		Vector3<float>(1,1,-1),
		Vector3<float>(1,-1,-1),
		Vector3<float>(1,-1,1)));

	// left
		//t1
	cube.push_back(
		Triangle(
		Vector3<float>(-1,1,-1),
		Vector3<float>(-1,1,1),
		Vector3<float>(-1,-1,1)));
		//t2
	cube.push_back(
		Triangle(
		Vector3<float>(-1,-1,1),
		Vector3<float>(-1,-1,-1),
		Vector3<float>(-1,1,-1)));

	// front
		//t1
	cube.push_back(
		Triangle(
		Vector3<float>(1,1,-1),
		Vector3<float>(-1,1,-1),
		Vector3<float>(-1,-1,-1)));
		//t2
	cube.push_back(
		Triangle(
		Vector3<float>(-1,-1,-1),
		Vector3<float>(1,-1,-1),
		Vector3<float>(1,1,-1)));
	
	// back
	cube.push_back(
		Triangle(
		Vector3<float>(-1,1,1),
		Vector3<float>(1,1,1),
		Vector3<float>(1,-1,1)));
		//t2
	cube.push_back(
		Triangle(
		Vector3<float>(1,-1,1),
		Vector3<float>(-1,-1,1),
		Vector3<float>(-1,1,1)));
	
	_models.insert(std::pair<std::string, std::vector<Triangle>>("Cube",cube));


	std::vector<Triangle> pirimid;
	// bottom
		//t1
	pirimid.push_back(
		Triangle(
		Vector3<float>(1,-1,1),
		Vector3<float>(1,-1,-1),
		Vector3<float>(-1,-1,-1)));
		//t2
	pirimid.push_back(
		Triangle(
		Vector3<float>(-1,-1,-1),
		Vector3<float>(-1,-1,1),
		Vector3<float>(1,-1,1)));
	/// front
	pirimid.push_back(
		Triangle(
		Vector3<float>(-1,-1,1),
		Vector3<float>(0,1,0),
		Vector3<float>(1,-1,1)));
	/// right
	pirimid.push_back(
		Triangle(
		Vector3<float>(1,-1,1),
		Vector3<float>(0,1,0),
		Vector3<float>(1,-1,-1)));
	/// left
	pirimid.push_back(
		Triangle(
		Vector3<float>(-1,-1,-1),
		Vector3<float>(0,1,0),
		Vector3<float>(-1,-1,1)));
	/// back
	pirimid.push_back(
		Triangle(
		Vector3<float>(1,-1,-1),
		Vector3<float>(0,1,0),
		Vector3<float>(-1,-1,-1)));

	_models.insert(std::pair<std::string, std::vector<Triangle>>("Pirmid",pirimid));

}
